import React from 'react'
 import { Icon } from 'react-vant';
import {useEffect,useState} from "react"
import axios from 'axios';
function Movie() {
  let [arr,setArr] = useState([])
  useEffect(()=>{
    axios.get("/list").then(res=>{
      console.log(res.data);
      setArr(res.data)
    })
  },[])
  return (
    // <div>
    //   <Icon name="chat-o" />
     
    <div>
    
         {
           arr && arr.length ? arr.map((item,index)=>{
             return <div key={index}>
                  <dl>
                      <dt><img src={item.img} alt="" className='imgs'/></dt>
                      <dd>
                        <p>{item.nm}</p>
                        <p>观众神评：{item.mk}</p>
                        <p>{item.desc}</p>
                        <p>{item.showInfo}</p>
                        <p className='buy'>购票</p>
                      </dd>
                  </dl>
             </div>
           }):"暂无数据"
         }
    </div>
  )
}

export default Movie